<template>
	<view class="detailPage" :data-theme="theme" :class="theme">
		<HeadCustom title=" " :isSpace="true" :isAppBtn="true" :isHome="true"></HeadCustom>
		<view class="detail" style="background: url(https://ebc-prod.cdn.benwunet.com/uni-static/activity-job/back2.png);">
			<view class="detail_top"><image class="s_img" :src="imgList[type]" mode="widthFix"></image></view>
			<view class="detail_content fboxRow Xcenter">
				<image class="back1_img" src="https://ebc-prod.cdn.benwunet.com/uni-static/activity-job/back1.png" mode="widthFix"></image>
				<view class="content">
					<image src="https://ebc-prod.cdn.benwunet.com/uni-static/activity-job/d_top.png" mode="widthFix"></image>
					<view class="content_box fboxRow Xcenter">
						<swiper class="swiper" :autoplay="true" :vertical="true" :interval="1000" :duration="2000" circular="true">
							<swiper-item v-for="(item, index) in zwList" :key="index">
								<view class="swiper-item fboxRow Ycenter">
									<image class="img_icon" src="https://ebc-prod.cdn.benwunet.com/uni-static/activity-job/icon1.png" mode="widthFix"></image>
									<text class="title_txt">{{ item.title }}</text>
									<text class="line_txt">--------------------------------------</text>
									<view class="btn_td" @tap="freeApply(item)">立即投递</view>
								</view>
							</swiper-item>
						</swiper>
					</view>
				</view>
				<view class="btn_img fboxRow Xcenter Ycenter"><image src="https://ebc-prod.cdn.benwunet.com/uni-static/activity-job/button.png" mode="widthFix" @tap="freeApply()"></image></view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			theme: getApp().globalData.appTheme,
			type: '',
			imgList: {
				gsdx: 'https://ebc-prod.cdn.benwunet.com/uni-static/activity-job/s_gsdx.png',
				kjxy: 'https://ebc-prod.cdn.benwunet.com/uni-static/activity-job/s_kjxy.png',
				sfdx: 'https://ebc-prod.cdn.benwunet.com/uni-static/activity-job/s_sfdx.png',
				gcxy: 'https://ebc-prod.cdn.benwunet.com/uni-static/activity-job/s_gcxy.png',
				lgdx: 'https://ebc-prod.cdn.benwunet.com/uni-static/activity-job/s_lgdx.png'
			},
			zwList: [
				{
					title: '运维工程师',
					id: '444347978862297088',
					companyId: '444338532601823232'
				},
				{
					title: '管培生',
					id: '444345500250931200',
					companyId: '444338532601823232'
				},
				{
					title: '自动化测试',
					id: '444347240283111424',
					companyId: '444338532601823232'
				},
				{
					title: 'AIGC工程师',
					id: '444346727806271488',
					companyId: '444338532601823232'
				},
				{
					title: '测试工程师',
					id: '444346081174618112',
					companyId: '444338532601823232'
				},
				{
					title: '大数据开发工程师',
					id: '444347620274470912',
					companyId: '444338532601823232'
				},
				{
					title: '考研市场实习生',
					id: '428487228709142528',
					companyId: '428476766424662016'
				},
				{
					title: '运营实习生',
					id: '403024871103135744',
					companyId: 'QY0000001369'
				},
				{
					title: '市场实习生',
					id: '403023604872118272',
					companyId: 'QY0000001369'
				},
				{
					title: 'Java高级开发工程师',
					id: '392128616978186240',
					companyId: 'QY0000001369'
				},
				{
					title: 'Android开发工程师',
					id: '392157364158988288',
					companyId: 'QY0000001369'
				},
				{
					title: '投融资助理',
					id: '441502295507599360',
					companyId: 'QY0000001369'
				},
				{
					title: '市场专员',
					id: '408834819766616064',
					companyId: 'QY0000001369'
				},
				{
					title: '社群运营',
					id: '393298654011588608',
					companyId: 'QY0000001369'
				},
				{
					title: 'app运营',
					id: '393299622015008768',
					companyId: 'QY0000001369'
				},
				{
					title: 'UI设计师',
					id: '400895016458780672',
					companyId: 'QY0000001369'
				},
				{
					title: '化学学科秘书',
					id: '401639566471069696',
					companyId: 'QY0000001373'
				},
				{
					title: '物理学科秘书',
					id: '402001007346712576',
					companyId: 'QY0000001373'
				},
				{
					title: '思想政治学科秘书',
					id: '401640097159577600',
					companyId: 'QY0000001373'
				},
				{
					title: '学科助理',
					id: '422359788148490240',
					companyId: 'QY0000001373'
				},

				{
					title: '运维工程师',
					id: '444347978862297088',
					companyId: '444338532601823232'
				},
				{
					title: '管培生',
					id: '444345500250931200',
					companyId: '444338532601823232'
				},
				{
					title: '自动化测试',
					id: '444347240283111424',
					companyId: '444338532601823232'
				},
				{
					title: 'AIGC工程师',
					id: '444346727806271488',
					companyId: '444338532601823232'
				},
				{
					title: '测试工程师',
					id: '444346081174618112',
					companyId: '444338532601823232'
				},
				{
					title: '大数据开发工程师',
					id: '444347620274470912',
					companyId: '444338532601823232'
				},
				{
					title: '考研市场实习生',
					id: '428487228709142528',
					companyId: '428476766424662016'
				},
				{
					title: '运营实习生',
					id: '403024871103135744',
					companyId: 'QY0000001369'
				},
				{
					title: '市场实习生',
					id: '403023604872118272',
					companyId: 'QY0000001369'
				},
				{
					title: 'Java高级开发工程师',
					id: '392128616978186240',
					companyId: 'QY0000001369'
				},
				{
					title: 'Android开发工程师',
					id: '392157364158988288',
					companyId: 'QY0000001369'
				},
				{
					title: '投融资助理',
					id: '441502295507599360',
					companyId: 'QY0000001369'
				},
				{
					title: '市场专员',
					id: '408834819766616064',
					companyId: 'QY0000001369'
				},
				{
					title: '社群运营',
					id: '393298654011588608',
					companyId: 'QY0000001369'
				},
				{
					title: 'app运营',
					id: '393299622015008768',
					companyId: 'QY0000001369'
				},
				{
					title: 'UI设计师',
					id: '400895016458780672',
					companyId: 'QY0000001369'
				},
				{
					title: '化学学科秘书',
					id: '401639566471069696',
					companyId: 'QY0000001373'
				},
				{
					title: '物理学科秘书',
					id: '402001007346712576',
					companyId: 'QY0000001373'
				},
				{
					title: '思想政治学科秘书',
					id: '401640097159577600',
					companyId: 'QY0000001373'
				},
				{
					title: '学科助理',
					id: '422359788148490240',
					companyId: 'QY0000001373'
				}
			]
		};
	},
	onLoad(option) {
		this.type = option.type;
	},
	methods: {
		//免费应聘
		freeApply(data) {
			if (data) {
				// 跳转职位详情
				console.log('跳转职位详情');
				this.$pageTo(`/recruit/enterprise/enterpriseDetail?id=${data.id}&companyId=${data.companyId}`);
			} else {
				// 跳转数字职场
				this.$pageTo('/recruit/user/index');
			}
		}
	}
};
</script>

<style scoped lang="scss">
::v-deep .uni-swiper-slide-frame {
	height: 80rpx !important;
}
::v-deep uni-swiper-item {
	overflow: unset !important;
}
::v-deep .uni-swiper-wrapper {
	height: 400rpx !important;
}
.detailPage {
	height: 100vh;
	.swiper-item {
		font-size: 22rpx;
		font-weight: bold;
		color: #000000;
		margin-top: 40rpx;
		.line_txt {
			flex: 1;
			white-space: nowrap;
			overflow: hidden;
		}
		.img_icon {
			width: 36rpx;
			height: 31rpx;
			margin-right: 20rpx;
		}
		.title_txt {
			max-width: 200rpx;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
		}
		.btn_td {
			padding: 10rpx 20rpx;
			background-color: #2860e9;
			color: #fff;
			font-size: 21rpx;
			font-weight: bold;
			border-radius: 17rpx;
			flex-shrink: 0;
		}
	}
	.detail {
		background-repeat: no-repeat !important;
		background-size: 100% 100% !important;
		.back2_img {
			position: absolute;
			width: 100%;
			height: 100%;
		}
		.detail_top {
			padding: 90rpx 0 35rpx 40rpx;
			.s_img {
				width: 100%;
			}
		}
		.detail_content {
			width: 100%;
			padding: 20rpx 40rpx;
			position: relative;
			.btn_img {
				position: absolute;
				bottom: 60rpx;
				> image {
					width: 318rpx;
				}
			}
			.content {
				position: absolute;
				top: 150rpx;
				left: 60rpx;
				.content_box {
					width: 460rpx;
					position: absolute;
					top: 110rpx;
					left: 84rpx;
					height: 100%;
					.swiper {
						flex: 1;
					}
				}
				> image {
					width: 580rpx;
				}
			}
			.back1_img {
				width: 100%;
			}
		}
	}
}
</style>
